# -!- coding: utf-8 -!-
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
海拍客存放api接口信息。以dict形式存放，这样就可以API_ALL[''][url]这种方式去取，看起来较直观，知道取得是哪个接口的那部分信息
#文件：hipac_api.py
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

import json
from pycacho.cachobase.deal_time import minus_date

c_date = minus_date(0,'q')       # '%Y%m%d%H%M%S'
c_time = minus_date(0,'qt')    # '%Y-%m-%d %H:%M:%S'

API_pethome={
    # 授信申请 补件信息
    "trade_info": {
        "deviceInfo":[
            {
            "devicePrice": "138000.00",
            "deviceName":"兽用数字化X射线摄影系统image-K70"
            },
            {
            "devicePrice": "130000.00",
            "deviceName":"兽用数字化X射线摄影系统image-K71"
            },

        ],
        "hospitalName":"上海",
        "outerProcessNo":"2325",
        "partnerNo":"RDPN0002",
        "merchantNo":"test",
        "paymentVoucher":"https://cdn-cloudmarket.5ichong.com/FnL25TlG_GbTLWjTAgSDILCdKo65",
        "procurementContract":"https://msxdbuc-share.oss-cn-shenzhen.aliyuncs.com/stage/rdxd/8356523663929302/pethome/procurement/20201012/1602472884564.pdf",
        "purchaseSaleContract":"https://encrypt-cdn.5ichong.com/ADS-20180705140111-FYL.pdf?e=1602320180&token=4EvIguWBfstRYNq4eovqhm2nSQzf15QCxP6LTQQZ:GR8FuV2n1dV5t4yqFO48ACwKhPw=",
        "timestamp":"1600167093000",
        "usage":1,
        "registerDays": 100,
        "materialTotalRefundAmt":50000.00,
        "deviceTotalRefundAmt": 6000.00,
        "materialTotalAmt": 120000.00,
        "deviceTotalAmt": 130000.00,
    },
    "riskCommit" : {
        "creditAmt": "500000",
        "idNo": "36242219881103431X",
        "mobile": "15917374871",
        "phoneCheck": "电核备注，300字以内",
        "processNo": "PRO202009221928166554107781",
        "rejectCode": "",   # HR004
        "remark": "",
        "riskResult": 2
}

}


if __name__ == '__main__':
    # json indent=缩进空格数,得到树型格式; ensure_ascii=False,不希望中文字符等被unicode转义; sort_keys=True,希望显示的字典内的字段是排过序的
    data = json.dumps(API_pethome['apply_message'],indent=4,ensure_ascii=False)
    print(data)

